package com.caigou.mapper.cms;

import com.caigou.bean.cms.entity.Article;
import com.caigou.bean.cms.param.ArticleListParam;
import com.caigou.bean.cms.param.FontMobilePram;
import com.caigou.bean.cms.param.LawArticleListParam;
import com.caigou.bean.vo.PlateIdSectionVO;
import com.caigou.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository("ArticleMapper")
public interface ArticleMapper {
    /*service接口*/
    int loadArticleExist(@Param("articleId") String articleId);

    int saveArticleData(Article article);

    Article loadArticle(@Param("articleId") String articleId);

    List<ArticleList> loadArticleList(ArticleListParam param);

    List<ArticleExportList> loadArticleExportList(ArticleListParam param);

    ArticleData loadArticleData(@Param("articleId") String articleId);

    LawReplace loadLawReplace(@Param("articleId") String articleId);

    int updateArticleData(Article article);

    int deleteArticleData(@Param("articleId") String articleId);

    int updateArticleStatus(@Param("articleId") String articleId, @Param("articleStatus") Integer articleStatus);

    int loadArticleMaxAudioIssue(@Param("audioType") Integer audioType);

    List<LawArticleList> loadLawArticleList(LawArticleListParam param);

    List<ArticleList> loadArticleListBySelect(ArticleListParam param);

























    int saveArticleData2(Article article);





    int updateArticleUrl(@Param("articleId") String articleId, @Param("url") String url);

    int updateArticleShareUrl(@Param("articleId") String articleId, @Param("imageUrl") String imageUrl);

    void updateArticleClickCount(@Param("articleId") String articleId, @Param("articleClick") String articleClickCount);

    List<ArticleList> findArticleByArticleKeyWord(String keyWord);

    int findArticleByArticleKeyWordCount(String keyWord);

    /*外部接口*/
    Article getArticle(@Param("articleId")String articleId);

    int getArticleCountByArticlePromoter(@Param("articlePromoterId")Integer articlePromoterId);

    List<Article> listLatestArticleByArticlePromoter(@Param("articlePromoterId")Integer articlePromoterId);

    List<Article> listArticleByArticlePromoter(@Param("articlePromoterId")Integer articlePromoterId);

    List<Article> listArticleByArticleAuthor(@Param("articlePromoterId")Integer articlePromoterId);

    /*用户端接口*/
    List<HotSearchArticle> loadHotSearchArticle(@Param("plateId") String plateId);

    List<SpecialArticleList> loadSpecialArticleList();

    List<ArticleList> findArticleByArticleIds(@Param("articleIds") List<String> articleIds);

    void updateArticleUVCount(@Param("articleId") String articleId);

    void updateArticlePVCount(@Param("articleId") String articleId);

    int updateArticleClick(@Param("articleId") String articleId);

    int updateArticleClickPhone(@Param("articleId") String articleId);

    List<ArticleList> findArticleByPlateIds(@Param("plateIdSections") List<PlateIdSectionVO> plateIdSections);

    List<ArticleList> findArticleAtlasByParam();

    List<ArticleList> findArticleAudioByParam();

    int deleteArticleByArticleId(@Param("articleId") String articleId);

    List<Article> listArticleInRecycle();

    Article selectByPrimaryKey(Integer id);

    List<Article> findUnIndexedArticleList(Integer size);


    Integer updateArticleIndexStatus(String articleId,Integer status);

    List<ArticleList> listMyCollectionArticle(@Param("articleIds") List<String> articleIds);

    List<Article> findArticleByArticleIdList(@Param("articleIds") List<String> articleIds);

    Article loadArticleByEmpire(@Param("empireId") Integer empireId);

    int updateEmpireData(Article article);

    ArticleMobileInfoData loadArticleMobileInfo(@Param("articleId") String articleId);

    List<Article> loadResetArticleHtmlList(@Param("id") Integer id, @Param("limit") Integer limit);

    Integer updateArticleKeyWord(String articleId, String articleKeyWord);

    List<String> loadArticleListByType(@Param("articleType") Integer articleType);

    List<ArticleList> findArticleByArticleKeyWords(@Param("keywords") List<String> keywords);

    void updateArticlePublicTime(@Param("articleId") String articleId);

    List<Article> loadArticleDisposeList(@Param("limit") Integer limit);

    void updateArticleDisposeStatus(@Param("articleId") String articleId);

    List<ChannelDataMobile> loadKeywordMobileList(@Param("keywords") List<String> keywords);

    List<ArticleList> findSpecialArticleByPlateIds();

    List<Article> loadArticleListBySubstation(@Param("substationId") Integer substationId);

    List<ArticleList> loadArticleByPlates(@Param("channelIds") List<String> channelIds);

    List<ArticleList> loadArticleByPlatesOrderClick(@Param("channelIds") List<String> channelIds);
}
